package Thread;
//自己重新定义一个类继承thread
//重写thread中的run
class MyThread extends Thread{
    @Override
    public void run(){
        System.out.println("重新定义一个类继承thread,重写run()");
    }
}
public class ThreadDemo1 {

    public static void main(String[] args) {
        System.out.println("四种方法,第一种:");
        Thread t=new MyThread();
        t.start();
    }

}
